<?php

class Zend_View_Helper_Menu extends Zend_View_Helper_Abstract
{
    public function menu(array $menu)
    {
        print "<li class='submenu2'><a class='submenu' href = '/index/page/id/". $menu['id']."'>" . $menu['translation'][0]['title'] . '</a>';

        if (count($menu['children']) > 0) {

            print('<ul class="submenu" >');
        }

        foreach ($menu['children'] as $children) {

            $this->menu($children);

        }

        if (count($menu['children']) > 0) {
            print('</ul >');
        }
        print '</li>';

    }
}
